import type { ComponentPublicInstance, ExtractPropTypes } from "vue";

export const battleScrollItemProps = {
  userId: {
    type: Number,
    default: "",
  },
  isMobile: {
    type: Boolean,
    default: false,
  },
  userNum: {
    type: Number,
    default: 0,
  },
};

export const battleScrollItemEmits = {
  start: () => true,
  end: (userId: number) => userId || true,
  tick: (index: number) => index || true,
};

export type BattleScrollItemProps = ExtractPropTypes<
  typeof battleScrollItemProps
>;

export type BattleScrollItemExpose = {
  start: (spin: API.Battles.BattleSpinItem) => void;
  getUserId: () => number;
};

export type BattleScrollItemInstance = ComponentPublicInstance<
  BattleScrollItemExpose,
  BattleScrollItemProps
>;
